home *** CD-ROM | disk | FTP | other *** search
/ Learn Microsoft Visual Basic 6.0 Now / Learn Microsoft Visual Basic 6.0 Now (Microsoft Press)(X03-58607)(1998).ISO / media / chap02 / b02d020.cc2 < prev    next >
Text File  |  1998-06-07  |  2KB  |  50 lines

  1. 0, In this demonstration, I'll use the OLE 
  2. 3, control to create a Microsoft Paint 
  3. 4, application object on a form. You can use 
  4. 8, the OLE control to add any application 
  5. 10, object registered in the Windows system 
  6. 12, registry to your program. In this case, I'll 
  7. 15, use a Paint object to give the user 
  8. 17, access to a painting program within their 
  9. 19, Visual Basic application. First, I'll 
  10. 22, create an OLE object on the form with the 
  11. 25, OLE control in the Visual Basic toolbox. 
  12. 31, When I release the mouse, the dialog box 
  13. 35, appears that gives me my options for 
  14. 37, inserting an object. I can scroll through 
  15. 40, the list box and select a bitmap image to 
  16. 44, open Microsoft Paint. I'll verify that 
  17. 49, the Create New option is selected to 
  18. 51, create a new application object rather than 
  19. 53, to create something from a file that 
  20. 54, already exists. And I'll click the Display 
  21. 57, As Icon button, so that an icon appears 
  22. 59, on my form. When I click OK, Visual 
  23. 64, Basic launches Microsoft Paint. In 
  24. 67, Microsoft Paint, the drawing tools appear next
  25. 70, to the drawing canvas on the screen. I'll 
  26. 72, create a simple smiley face with the 
  27. 74, spray can and red paint. And we'll copy this 
  28. 80, back into our Visual Basic application. 
  29. 86, To return to the program, we select 
  30. 89, Exit and Return from the File menu. To 
  31. 95, customize my OLE object, I'll set the 
  32. 97, BorderStyle property to None to remove the 3-D 
  33. 102, effect of the OLE object. And I'll set 
  34. 106, the BackColor property to be the same 
  35. 111, color as the background of the form. Then, 
  36. 114, I'll resize my OLE object so that I can 
  37. 116, see its label clearly and position it 
  38. 119, in an appropriate place on the form. When 
  39. 122, I run the program, the bitmap image 
  40. 126, appears as an icon on the screen. When I 
  41. 131, double-click the Microsoft Paint icon, the 
  42. 133, document appears in a window on the 
  43. 135, screen. I can modify the drawing, if I 
  44. 140, want. Here's a set of eyeglasses we'll do 
  45. 147, just quickly. And when I'm finished, I can 
  46. 150, return to the program with the Exit and 
  47. 152, Return command.You can use this technique 
  48. 158, to add any application object to your 
  49. 160, program.
  50. 161, END